# 负责整个项目的配置信息
class Config(object):
    # 配置数据库和SQLAlchemy
    HOSTNAME = '127.0.0.1'
    PORT = '3306'
    DATABASE = 'test'
    USERNAME = 'root'
    PASSWORD = '16432912890.'
    DB_URI = 'mysql+pymysql://{}:{}@{}:{}/{}?charset=utf8mb4'.format(USERNAME, PASSWORD, HOSTNAME, PORT, DATABASE)
    # 把链接数据库的参数设置到app中
    SQLALCHEMY_DATABASE_URI = DB_URI
    SQLALCHEMY_TRACK_MODIFICATIONS = False


# 开发环境下的配置信息
class DevelopmentConfig(Config):
    DEBUG = True
    SQLALCHEMY_EHCO = True  # 打印SQL语句


# 生产环境中的配置信息
class ProductConfig(Config):
    pass


